<!--
 * @Description: 
 * @Author: 赵升华
 * @Date: 2019-09-02 09:15:06
 * @LastEditors: 赵升华
 * @LastEditTime: 2019-09-02 10:05:05
 -->
<template>
  <div class="bottomBar">
    <tabbar>
      <tabbar-item selected link="/home">
        <img slot="icon" :src="home">
        <!-- <span slot="label">首页</span> -->
      </tabbar-item>
      <tabbar-item link="/invest">
        <img slot="icon" :src="invest">
        <!-- <span slot="label">投资</span> -->
      </tabbar-item>
      <tabbar-item link="/my" @click="isLogin">
        <img slot="icon" :src="my">
        <!-- <span slot="label">我的</span> -->
      </tabbar-item>
    </tabbar>
  </div>
</template>
<script>
import { Tabbar, TabbarItem} from 'vux'

export default {
  components: {
    Tabbar,
    TabbarItem,
  },
  created(){
    if(this.$route.path.indexOf('home') > 0 || this.$route.path == '/'){
      this.home = 'https://www.bigzhuan.com/img/home1.png'
    }
    if(this.$route.path.indexOf('invest')> 0){
      this.invest = 'https://www.bigzhuan.com/img/bz-selected-icon.png'
    }
    if(this.$route.path.indexOf('my')> 0){
      this.my = "https://www.bigzhuan.com/img/my.png"
    }
  },
  data(){
    return {
      home:'https://www.bigzhuan.com/img/home.jpg',
      invest:'https://www.bigzhuan.com/img/bz-icon.png',
      my:"https://www.bigzhuan.com/img/my.jpg"
    }
  },
  methods:{
    isLogin(){
      // console.log('my');
    }
  }
}
</script>
<style lang="less">
@import '../../../style/mixin.less';

  .weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon, .weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon > i, .weui-tabbar__item.weui-bar__item_on .weui-tabbar__label{
    color:#dd3930 !important;
  }
  .bottomBar{
    .weui-tabbar{
      .wh(100%,1.4rem);
      max-width: 10rem;
      .bg(#fff);
      .weui-tabbar__item,.weui-bar__item_on{
        .fx(column);
        padding-top: 0;
      }
    }
    .weui-tabbar__icon{
      .wh(0.6rem,1rem);
    }
  }
</style>
